package com.pn.mapper;

import com.pn.entity.Pet;
import com.pn.util.PageCriterion;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component(value = "petMapper")
public interface PetMapper {
    int deleteByPrimaryKey(Integer pid);

    int insert(Pet pet);

    int insertSelective(Pet pet);

    Pet selectByPrimaryKey(Integer pid);

    int updateByPrimaryKeySelective(Pet pet);

    int updateByPrimaryKeyWithBLOBs(Pet pet);

    int updateByPrimaryKey(Pet pet);

    List<Pet> listAllByCriterion (PageCriterion pageCriterion);

    List<Pet> listAvaliableByCriterion (PageCriterion pageCriterion);

    List<Pet> listAdoptedByCriterion (PageCriterion pageCriterion);

    List<Pet> listByUidByCriterion (@Param("start") Integer start,@Param("pageSize") Integer pageSize,@Param("uid") Integer uid);

    List<Pet> listByPtidByCriterion (@Param("start") Integer start,@Param("pageSize") Integer pageSize,@Param("ptid") Integer ptid);

    //该功能还未实现
    List<Pet> listFuzzyByCriterion (PageCriterion pageCriterion,String searchKey);
}